oldName = input('请输入你要备份的文件名：')

index = oldName.rfind('.')
if index > 0:
    newName = oldName[:index] + '[备份]' + oldName[index:]

    old_f = open(oldName, 'rb')
    new_f = open(newName, 'wb')
    # 防止文件过大
    while True:
        con = old_f.read(3)
        if len(con) == 0:
           break
        new_f.write(con)
else:
    print('文件名无效')
